/**
 *轻云蒜瓣已购产品CRM面板
 */
Ext.define("PRO.sale.view.SaleGroup",{
    extend: 'Ext.panel.Panel',
    border:0,
    alias: 'widget.sale.salegroup',
    autoScroll:true,
    layout:'hbox',
    bodyCls:'pro-sale-group',
    bodyStyle:'border:0',
    initComponent: function(){
        var me=this;

        me.newData=[];
        me.data=me.getLoadData();
        me.closeType='0';
        me.items = [
            {xtype:'box',flex:.5,border:0},
            me.getSaleItem('销售','red'),
            me.getSaleItem('销售经理','yellow'),
            me.getSaleItem('技术/高管','blue'),
            me.getSaleItem('服务','green')
        ];
        me.createStyle();
        me.listeners={
            afterrender:function(view){
                if(JE.isNotEmpty(me.sjType)){
                    var win=view.up('window');
                    win.on('beforeClose',function(){
                        if(JE.isNotEmpty(me.newData) && me.closeType=='0'){
                            if(win.allowClose){
                               return true;
                            }
                            JE.confirm('关闭窗口将不   保    留当前数据，确定关闭?',function(btn){
                                if(btn=='ok'){
                                    win.allowClose = true;
                                    win.close();
                                }
                            });

                            return false;
                        }
                    });
                }
            }
        };
        me.bbar={
            xtype:'container',
            layout:'column',
            itemId:'barView',
            margin:'0 0 20px 40px',
            weight:100,
            items:[{
                xtype:'yesnofield',
                name:'bonusType',
                itemId:'bonusType',
                hidden:JE.isNotEmpty(me.sjType)?false:true,
                unitTpl:'启动四连环计划奖金',
                unitTplStyle:'border:0px;color: #446afd;font-size: 14px;font-weight: bold;width: 140px;',
                 listeners:{
                     change:function(field,newVal,oldVal){
                        var money=me.getCmp('barView').getCmp('money');
                        var SPR_NAME=me.getCmp('barView').getCmp('SPR_NAME');
                        if(newVal){
                            money.show();
                            SPR_NAME.show();
                        }else{
                            money.hide();
                            SPR_NAME.hide();
                        }
                     }
                 }
            },{
                xtype:'numberfield',
                //hideTrigger:true,
                minValue:0,
                margin:'0 0 0 20px',
                hidden:true,
                itemId:'money',
                unitTpl:'元',
                allowBlank:false,
                unitTplStyle:'border:0px'
            },{
                xtype:'treessfield',
                minValue:0,
                fieldLabel:'审批人',
                labelWidth:65,
                labelStyle:'font-size:14px',
                margin:'0 0 0 20px',
                hidden:true,
                allowBlank:false,
                name:'SPR_NAME',
                itemId:'SPR_NAME',
                listeners:{
                    beforequery:function(field){
                        var mainPanel=field.up('[itemId=barView]');
                        var idField=mainPanel.down("field[name=SPR_ID]")
                        var nameValue=field.getValue();
                        var idValue=idField.getValue();
                        //PDID获取
                        var funcData=JE.getFuncData("CRM_YXGL_XSSLH");
                        var pdid="";
                        var processKey="xiaoshousilianhuanshenpiliu_19010315";
                        var lastVersion=0;
                        for(var key in funcData.wf.infos){
                            var info=funcData.wf.infos[key];
                            if(info.processKey==processKey){
                                var nowVersion=key.substr(key.lastIndexOf("-")+1)*1;
                                if(nowVersion>lastVersion){
                                    pdid=key;
                                    lastVersion=nowVersion;
                                }
                            }
                        }
                        if(JE.isEmpty(pdid)){
                            JE.alert("未找到奖金申请流程定义!");
                            return false;
                        }
                        me.SLH_PDID=pdid;
                        var taskName="公司领导";
                        var lists=JE.ajax({url:JE.getUrlMaps('je.core.wf.taskInfo', 'loadTaskAssgine'),params:{beanId:"",pkValue:"",pdid:pdid,userDiy:"1",targerTaskName:taskName}});
                        var node = lists[0].children[0];
                        var description = Ext.decode(Ext.value(lists[0].description,'{}'));
                        //配置异步数据
                        var treeConfig = {};
                        if(node.code == 'DEPTUSER' && description.async){
                            var cfg = {
                                "ddCode":"JE_CORE_DEPTUSER",
                                "ddName":node.text,
                                "nodeInfo":"",
                                "async":true,
                                "wfUser":true,
                                "whereSql":Ext.value(description.whereSql),
                                "orderSql":Ext.value(description.orderSql),
                                "parentSql":"","rootId":"ROOT","params":{},"initParams":{},"moreRoot":false,"queryField":"","nodeField":"","formatValue":""
                            };
                            treeConfig.configInfo = [cfg];
                            treeConfig.async = true;
            //				treeConfig.searchTpl='{text}({parentText})';
                            treeConfig.loadInfo = {
                                url:'/jbpm/taskInfoAction!loadAsyncAssgine.action',
                                params:{
                                    node:'ROOT',
                                    onlyItem:false,
                                    excludes:'checked',
                                    whereSql:'',
                                    orderSql:'',
                                    pdid:wpdid,
                                    userDiy:"1",
                                    targerTaskName:taskName,
                                    strData:Ext.encode(treeConfig.configInfo)
                                }
                            };
                        }
                        treeConfig.searchTpl = [
                            '<ul class="' + Ext.plainListCls + '">',
                                '<tpl for=".">',
                                    '<li role="option" unselectable="on" class="x-boundlist-item">{[this.innerTpl(values)]}</li>',
                                '</tpl>',
                            '</ul>',
                            {
                                innerTpl:function(values){
                                    if(JE.isNotEmpty(values.parentText) && values.leaf){
                                        return values.text+"("+values.parentText+")";
                                    }else{
                                        return values.text;
                                    }
                                }
                            }
                        ];
                        var win=JE.selectWin({
                            title:"选择人员",
                            type:'tree',
                            itemId:'tree',
                            rootData:{
                                id:'ROOT',
                                text:"ROOT",
                                children:node.children
                            },
                            value:JE.isNotEmpty(idValue)?idValue:'',
                            valueType:'nodeInfo',
                            treeConfig:treeConfig,
                            multiSelect:['batchtask','joint','countersign'].indexOf(lists[0].nodeInfoType)!=-1,
            //				configInfo:'JE_CORE_DEPTUSER,,,M_',
                            callback:function(sels){
                                var userIds = [];
                                var userNames = [];
                                var userCodes=[];
                                Ext.each(sels,function(sel){
                                    if(userIds.indexOf(sel.get("code"))==-1){
                                        userIds.push(sel.get("nodeInfo"));
                                        userCodes.push(sel.get("code"));
                                        userNames.push(sel.get('text'));
                                    }
                                });
                                field.setValue(userNames.join(","));
                                idField.setValue(userIds.join(","));
                                me.userCodes=userCodes.join(",");
                            }
                        });
                        return false;
                    }
                }
            },{
                xtype:'textfield',
                minValue:0,
                margin:'0 0 0 20px',
                hidden:true,
                name:'SPR_ID',
                itemId:'SPR_ID',
            }]
        };
        me.buttonAlign='center';
        me.buttons=[{
            xtype:"button",
            text:'确定启动销售四连环',
            cls : 'btn JEPLUS_B_L10',
            hidden:JE.isNotEmpty(me.sjType)?false:true,
            handler:function(){
                me.dosave();
            }
        },{
            xtype:'button',
            cls:'btn',
            text:"取消",
            hidden:JE.isNotEmpty(me.sjType)?false:true,
            handler:function(){
                me.up('window').close();
            }
        }]
        me.callParent(arguments);
    },
    getUserData:function(){
        var me = this,data = [];
        Ext.each(me.body.query('.user'),function(userDom){
            var id = userDom.getAttribute('data-id');
            if(id){
                data.push(id);
            }
        })
        return data;
    },
    getSaleItem:function(title,type){
        var me=this;
        var obj=me.data;
        var data=[];
        if(type=='red'){
            Ext.each(obj.saler,function(obj){
                data.push({text:obj.name,id:obj.id,typeCode:obj.type});
            });
        }else if(type=='yellow'){
            Ext.each(obj.saleManager,function(obj){
                data.push({text:obj.name,id:obj.id,typeCode:me.getLoadStatusCode(obj.statusCode),reason:obj.reason});
            });

        }else if(type=='blue'){
            Ext.each(obj.artisan,function(obj){
                data.push({text:obj.name,id:obj.id,typeCode:me.getLoadStatusCode(obj.statusCode),reason:obj.reason});
            });
        }else if(type=='green'){
            Ext.each(obj.service,function(obj){
                data.push({text:obj.name,id:obj.id,typeCode:me.getLoadStatusCode(obj.statusCode),reason:obj.reason});
            });
        }

        var box = {
            xtype:'box',
            flex:1,
            cls:'pro-sale-group-item '+type,
            data:data,//[{text:'张帅鹏',status:'1'},{text:'云凤程'},{text:'赵立松'}],
            tpl:[
                '<div class="title"><div>'+title+'</div></div>',
                '<div class="circle-big"><div></div></div>',
                '<div class="users">',
                    '<tpl for=".">',
                        type == 'red'?
                        '<div data-id="{id}" class="user"><div class="circle"></div>{text}<tpl if="typeCode == 1">(负责人)</tpl></div>':
                        '<div data-id="{id}" class="user <tpl if="typeCode == \'\'">on</tpl>"><div class="circle"></div>{text}{typeCode}',
                        '<tpl if="typeCode== \'(已拒绝)\' || typeCode== \'(已分配)\' || typeCode== \'(已退出)\'">',
                            '<i data-reason="{reason}" data-typeCode="{typeCode}" style="margin-left:5px;margin-top:5px;" class="jeicon jeicon-exclamation-circle xsslh-cxly"></i>',
                        '</tpl>',
                        type == 'red'?"":
                        '<i data-id="{id}" class="remove jeicon jeicon-error-circle-o"></i></div>',
                    '</tpl>',
                    type == 'red'?'':'<div class="user"><div class="circle"></div>邀请<i class="add jeicon jeicon-plus-circle-o"></i></div>',
                '</div>'
            ],
            listeners:{
                afterrender:function(box){
                    box.getEl().on('click',function(e){
                        var fourLinksIdentity='';
                        if(type=='red'){
                            fourLinksIdentity='XS';
                        }else if(type=='yellow'){
                            fourLinksIdentity='XSJL';
                        }else if(type=='blue'){
                            fourLinksIdentity='JS';
                        }else if(type=='green'){
                            fourLinksIdentity='FW';
                        }
                        var remove = e.getTarget('.remove',1,true);
                        var add = e.getTarget('.add',1,true);
                        var cxly=e.getTarget('.xsslh-cxly',1,true);
                        if(cxly){
                            var reasson=cxly.getAttribute('data-reason');
                            var typeCode=cxly.getAttribute('data-typeCode');
                            var titleText='';
                            if(typeCode=='(已分配)'){
                                titleText='已分配理由';
                            }else if(typeCode=='(已拒绝)'){
                                titleText='拒绝理由';
                            }else if(typeCode=='(已退出)'){
                                titleText='退出理由';
                            }
                            JE.win({
                                xtype:'panel',
                                height:450,
                                layout:'fit',
                                width:600,
                                title:titleText,
                                items:{
                                 xtype:'box',
                                 layout:'fit',
                                 data:{XSSLH_CXLY:reasson},
                                     tpl:new Ext.XTemplate(
                                      '<p style="line-height:1.5;padding:10px;margin-top:10px;font-size: 19px;font-family: 宋体;">{XSSLH_CXLY}</p>'
                                  )
                                },
                                useButton:[{
                                text:'关闭',
                                cls : 'btn JEPLUS_B_L10',
                                handler:function(btn){
                                        btn.up('window').close();
                                }
                                }]
                            }).show();
                        }
                        if(remove){
                            var id=remove.getAttribute('data-id');
                            if(JE.isNotEmpty(id)){
                                if(JE.isNotEmpty(me.sjType)){
                                    var i;
                                    Ext.each(me.newData,function(data,index){
                                        if(data.id==id){
                                            i=index;
                                        }
                                    });
                                    me.newData.splice(i,1);
                                    remove.parent().destroy();
                                }else{
                                    var win=JE.win({
                                        width:650,
                                        height:300,
                                        border:0,
                                        title:'删除参与人',
                                        xtype:'panel',
                                        padding:"30px 50px",
                                        itemId:'participantsView',
                                        items:[
                                            {
                                            margin:'0 0 50px 0',
                                            xtype:'textarea',
                                            height:150,
                                            maxLength:'50',
                                            itemId:'reasonView',
                                            fieldLabel:'删除理由',
                                            allowBlank:false,
                                            emptyText:'请输入删除参与人的理由',
                                        }],
                                        useButton:true,
                                        fn:function(w){
                                            var reason= w.getCmp('reasonView').getValue();
                                            if(JE.isNotEmpty(reason)){
                                                if(reason.length<=50){
                                                    var obj=JE.ajax({
                                                        url:'/je/product/crm/customerPortrit/deleteRingParticipant',
                                                        params:{
                                                            id:id,
                                                            chanceId:me.backId,
                                                            reason:reason
                                                        }
                                                    });
                                                    if(obj.success){
                                                        remove.parent().destroy();
                                                        JE.msg('删除成功!');
                                                    }
                                                }else{
                                                    return false;
                                                }

                                            }else{
                                                JE.msg('内容不能为空!');
                                                return false;
                                            }


                                        }
                                    }).show();

                                }

                            }
                        }else if(add){
                            var persons=[];
                            var win=JE.win({
                                width:650,
                                height:380,
                                border:0,
                                title:'邀请参与人',
                                xtype:'panel',
                                padding:"30px 50px",
                                layout:'column',
                                itemId:'participantsView',
                                items:[{
                                    xtype:'vueuserfield',
                                    allowBlank:false,
                                    fieldLabel:'参与人',
                                    labelStyle:'margin-left: 36px;',
                                    name:'inviterNAME',
                                    columnWidth:1,
                                    itemId:'inviterNAME',
                                    height:30,
                                    closable:true,
                                    configInfo:'JE_CORE_QUERYUSER,inviterNAME~inviterId,text~id,M',
                                    listeners:{
                                        query:function(field,sels){
                                            var selectDatas=[];
                                            var ids = [],texts = [],inallIds=[];
                                            var allIds=me.getUserData();
                                            Ext.each(sels,function(r){
                                                if(allIds.indexOf(r.id) == -1){
                                                    ids.push(r.id);
                                                    texts.push(r.text);
                                                    selectDatas.push(r);
                                                }
                                            });
                                            inallIds=ids.concat(allIds);
                                            field.setValue(texts.join(','));
                                            field.up('panel[itemId=participantsView]').getCmp('inviterId').setValue(ids.join(','));
                                            if(inallIds.length>50){
                                                JE.alert('参与人不能超过50人');
                                                return false;
                                            }
                                            if(JE.isEmpty(ids) || JE.isEmpty(texts)){
                                                JE.alert('人员已存在!请重新选择!');
                                                return false;
                                            }
                                        }
                                    }
                                },{
                                    xtype:'textfield',
                                    hidden:true,
                                    itemId:'inviterId',
                                    fieldLabel:'邀请人ID',
                                    name:'inviterId'
                                },{
                                    margin:'10px 0 50px 0',
                                    xtype:'textarea',
                                    height:150,
                                    maxLength:'50',
                                    itemId:'reasonView',
                                    columnWidth:1,
                                    fieldLabel:'请求协助内容',
                                    allowBlank:false,
                                    emptyText:'请输入参与人需要协助的具体工作内容，例如：参会的时间及会议地点。',
                                }],
                                useButton:true,
                                fn:function(w){
                                    var persons=[];
                                    var reason= w.getCmp('reasonView').getValue();
                                    var ids=w.getCmp('inviterId').getValue().split(',');
                                    var texts=w.getCmp('inviterNAME').getValue().split(',');
                                    if(JE.isNotEmpty(reason) && JE.isNotEmpty(texts)){
                                        if(reason.length>50){
                                            return false;
                                        }else{
                                            for(var i=0;i<=ids.length-1;i++){
                                                persons.push({id:ids[i],name:texts[i],fourLinksIdentity:fourLinksIdentity,reason:reason});
                                            }
                                            if(JE.isNotEmpty(me.sjType)){
                                                me.newData= me.newData.concat(persons);
                                                    var html = [];
                                                Ext.each(persons,function(p){
                                                    html.push('<div class="user" data-id="'+p.id+'"><div class="circle"></div>'+p.name+'(邀请中)<i data-id="'+p.id+'" class="remove jeicon jeicon-error-circle-o"></i></div>');
                                                });
                                                add.parent().insertHtml('beforeBegin',html.join(''));
                                                me.doLayout();
                                            }else{
                                                    var obj=JE.ajax({
                                                    url:"/je/product/crm/customerPortrit/saveRingParticipant",
                                                    params:{
                                                        goodsChanceId:me.sjId,  //商机id
                                                        goodsChanceName:me.sjname, //商机名称
                                                        ringId:me.backId,  // 销售四连环id
                                                        persons:JSON.stringify(persons)
                                                    },
                                                });
                                                if(obj.success){
                                                    JE.msg('邀请成功!');
                                                    var html = [];
                                                    Ext.each(persons,function(p){
                                                        html.push('<div class="user" data-id="'+p.id+'"><div class="circle"></div>'+p.name+'(邀请中)<i data-id="'+p.id+'" class="remove jeicon jeicon-error-circle-o"></i></div>');
                                                    });
                                                    add.parent().insertHtml('beforeBegin',html.join(''));
                                                    me.doLayout();
                                                }
                                            }
                                        }
                                    }else{
                                        JE.msg('内容或人员不能为空!');
                                        return false;
                                    }

                                }
                                }).show();

                        }
                    });
                }
            }
        };
        return box;
    },
    createStyle:function(){
        var id = 'pro-sale-group';
        if(Ext.get(id)){return;}
        var css = [
            '.pro-sale-group{padding:20px 30px;}',
            '.pro-sale-group .x-box-inner:before{content: " ";height: 6px;width: 90%;background: #E6E5E2;position: absolute;left: 2%;top: 50px;border-radius: 4px;}',
            '.pro-sale-group .pro-sale-group-item{}',
            '.pro-sale-group .pro-sale-group-item:before{content: " ";height:100%;width:2px;position: absolute;left: 16px;top:50px;}',
            '.pro-sale-group .title{font-size: 18px;font-weight: bold;}',
            '.pro-sale-group .title div{width: 84px;margin-left: -26px;text-align: center;display: inline-block;}',
            '.pro-sale-group .circle-big{padding-top: 10px;}',
            '.pro-sale-group .circle-big div{height: 35px;width: 35px;display: inline-block;border-radius: 100%;}',
            '.pro-sale-group .users{position: relative;padding: 10px 0;color: #5a5a5a;}',
            '.pro-sale-group .users .user{padding: 10px 0;}',
            '.pro-sale-group .users .user .circle{width: 10px;height: 10px;border-radius: 100%;background: #c7c7c7;display: inline-block;margin: 0 12px;}',
            '.pro-sale-group .users .user i{margin-left:5px;cursor: pointer;color: #5a5a5a;}',
            '.pro-sale-group-item.red .users .user {color:#ff9570}',
            '.pro-sale-group-item.red .users .user .circle{background-color:#ff9570}',
            '.pro-sale-group-item.red .circle-big div,.pro-sale-group-item.red:before{background-color:#ff9570}',
            '.pro-sale-group-item.yellow .users .user.on {color:#FFD956}',
            '.pro-sale-group-item.yellow .users .user.on .circle{background-color:#FFD956}',
            '.pro-sale-group-item.yellow .circle-big div,.pro-sale-group-item.yellow:before{background-color:#FFD956}',
            '.pro-sale-group-item.blue .users .user.on {color:#0EC8E6}',
            '.pro-sale-group-item.blue .users .user.on .circle{background-color:#0EC8E6}',
            '.pro-sale-group-item.blue .circle-big div,.pro-sale-group-item.blue:before{background-color:#0EC8E6}',
            '.pro-sale-group-item.green .users .user.on {color:#11C690}',
            '.pro-sale-group-item.green .users .user.on .circle{background-color:#11C690}',
            '.pro-sale-group-item.green .circle-big div,.pro-sale-group-item.green:before{background-color:#11C690}',
            '.pro-sale-group .users .user i.xsslh-cxly{color: #ebebeb;}',
            '.pro-sale-group .users .user i.xsslh-cxly:hover{color:#386bd0;}'
        ].join(' ');

        Ext.util.CSS.createStyleSheet(css,'pro-sale-group');
    },
    getLoadData:function(){
        var me=this;
        var data=[];
        if(JE.isEmpty(me.sjType)){
            var obj=JE.ajax({
                url:"/je/product/crm/customerPortrit/getRingParticipant",
                params:{id:me.backId,
                        sjId:me.sjId
                    },
            });
            data=obj;
        }else{
            var obj=JE.ajax({
                url:"/je/product/crm/customerPortrit/getRingBigMan",
                params:{customerId:me.sjId},
            });
            data=obj;
        }
        return data;
    },
    getLoadStatusCode:function(code){
        var name='';
        if(code=='YQZ'){
            name='(邀请中)';
        }else if(code=='YRL'){
            name='';
        }else if(code=='YJJ'){
            name='(已拒绝)';
        }else if(code=='YFP'){
            name='(已分配)';
        }else if(code=='BFP'){
            name='(被分配)';
        }else if(code=='YTC'){
            name='(已退出)';
        }
        return name;
    },
    dosave:function(){
        var me=this;
        var barView=me.getCmp('barView');
        var bonusTypeVal=barView.getCmp('bonusType').getValue();
        var money=barView.getCmp('money').getValue();
        var SPR_ID=barView.getCmp('SPR_ID').getValue();
        var SPR_NAME=barView.getCmp('SPR_NAME').getValue();
        if(bonusTypeVal){
            if(JE.isEmpty(money) ||JE.isEmpty(SPR_ID)){
                JE.alert('奖金和审批人不能为空');
                return false;
            }
            if(JE.toNum(money)<=0){
                JE.alert('奖金不能小于等于0');
                return false;
            }
        }

        var obj=JE.ajax({
            url:"/je/product/crm/customerPortrit/startUpRing",
            params:{
                    persons:JSON.stringify(me.newData),
                    coustomerId:me.sjId,
                    bounsStatus:bonusTypeVal?'1':'0',
                    bounsAmount:JE.isNotEmpty(money)?money:'0',
                    pdid:me.SLH_PDID,
                    taskName:"公司领导",
                    SPR_ID:SPR_ID,
                    SPR_NAME:SPR_NAME,
                    SPR_CODE:me.userCodes
                },
        });
        if(obj.success){
            var form=me.upForm;
            form.setValues({XSSJ_YESORNO_NAME:'启动',XSSJ_YESORNO_CODE:'1'},true);
            //var XSSJ_YESORNO_NAME=form.form.findField('XSSJ_YESORNO_NAME');
           // XSSJ_YESORNO_NAME.setValue('启动');
            //var XSSJ_YESORNO_CODE=form.form.findField('XSSJ_YESORNO_CODE');
            //XSSJ_YESORNO_CODE.setValue('1');
            //var saveBtn=form.getButton('formSaveBtn');
            //saveBtn.fireHandler();
            //JE.msg('邀请成功!');
            me.closeType='1';
            me.up('window').close();
            me.successWin(money,bonusTypeVal);
        }else{
            JE.msg(obj.obj);
        }
       // me.successWin(money,bonusTypeVal);
    },
    successWin:function(money,type){
        var me=this;
        var money=JE.isNotEmpty(money)?money:'0';
        var names='',typeHtml='';
        if(JE.isNotEmpty(me.newData)){
            Ext.each(me.newData,function(data){
                names=names+data.name+'，';
            });
            names=names.substring(-1,names.length-1);
        }else{
            names='无';
        }
        if(type){
            typeHtml='<p style="margin-top: 10px;text-align: center; font-size: 16px;font-weight: 600;color:#E65C24">已启动计划奖金'+money+'元</p>'
        }else{
            typeHtml='<p style="margin-top: 10px;text-align: center; font-size: 16px;font-weight: 600;color:#A9ABA9">未启动计划奖金</p>'
        }
        Ext.getBody().mask();
        var win=Ext.create('Ext.container.Container', {
            width:500,
            height:283,
            itemId:'container',
            floating:true,
            autoShow:true,
            style:'background-image:url('+JE.buildCdnUrl('/pro/sale/images/SLH_SUCCESS.png')+');background-size: contain;background-repeat: no-repeat;background-color: transparent;',
            draggable: true,
            layout:'border',
            frame: true,
            shadow:false,
            model:true,
            items:[{
                xtype:'container',
                region:'center',
                maxHeight:240,
                html:'<div style="text-align: center;padding: 0px 40px;margin-top: 130px;">'+
                    '<p style="font-size: 14px;margin-top: 20px;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 3; -webkit-box-orient: vertical;">参与人为:  '+names+'</p>'+
                    typeHtml+
                '</div>',
            },{
                xtype:'button',
                text:'关闭',
                region:'south',
                margin:'0 215 10 215',
                cls : 'btn JEPLUS_B_L10',
                handler:function(btn){
                    btn.up('[itemId=container]').destroy();

                    Ext.getBody().unmask();
                }
            }]
        }).center();
    }
});
